﻿package tk.mystudio.web.action;

import tk.mystudio.util.Order;
import tk.mystudio.util.Page;

import com.opensymphony.xwork2.ActionSupport;

public abstract class CommonAction<T> extends ActionSupport {

	// _search=false&nd=1304082401641&rows=20&page=1&sidx=id&sord=asc

	protected final String INDEX = "index";
	protected final String JSON = "json";

	protected Integer pageSize;
	protected Integer currentPage;
	protected String sortField;
	protected String order;

	protected Page<T> page;
	protected Order[] orders;
	
	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}

	public String getSortField() {
		return sortField;
	}

	public void setSortField(String sortField) {
		this.sortField = sortField;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public Order[] getOrders() {
		return orders;
	}

	public void setOrders(Order[] orders) {
		this.orders = orders;
	}

	public abstract Page<T> getPage();

}
